package com.ipartek.pruebas.dao;

import java.util.List;

import com.ipartek.pruebas.bean.Alumno;

public class PruebaDAO {
	
	public static void main(String[] arg){
		
		System.out.println("Listado de alumnos con la Factoria para TXT");	
		DAOFactory f = DAOFactory.getFactoria( DAOFactory.TXT );
		AlumnoDAO alum = f.getAlumno();
		List<Alumno> list = alum.getAlumnos();
		for(int i = 0; i<list.size(); i++){
			Alumno a = list.get(i);
			System.out.println(a.toString());
			
		}
		
		
		System.out.println("Listado de alumnos con la Factoria para ODBC");
		DAOFactory factODBC =   DAOFactory.getFactoria( DAOFactory.OBDC );
		AlumnoDAO alumDAO = factODBC.getAlumno();
		List<Alumno> list2 = alumDAO.getAlumnos();
		for(int i = 0; i<list2.size(); i++){
			Alumno a = list2.get(i);
			System.out.println(a.toString());
			
		}
		
		
	}

}
